package com.example.demorabbitmqlisten.rabbitmq;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@TableName("haocaichuku")
public class HaoCaiChuKuEntity {
    @TableId(value = "id", type = IdType.UUID)
    private String id;
    /**
     * ⼊库⽇期
     */
    @TableField(value = "entryDate")
    private LocalDateTime entryDate;
    /**
     * 供应商编码
     */
    @TableField(value = "supplierCode")
    private String supplierCode;
    /**
     * 随货单号
     */
    @TableField(value = "deliveryNoteNo")
    private String deliveryNoteNo;
    /**
     * 耗材编码
     */
    @TableField(value = "consumableCode")
    private String consumableCode;
    /**
     * 批号
     */
    @TableField(value = "batchNo")
    private String batchNo;
    /**
     * 有效期
     */
    @TableField(value = "expirationDate")
    private LocalDateTime expirationDate;
    /**
     * 数量
     */
    @TableField(value = "quantity")
    private BigDecimal quantity;
    /**
     * 单价
     */
    @TableField(value = "unitPrice")
    private BigDecimal unitPrice;
    /**
     * ⾦额
     */
    @TableField(value = "amount")
    private BigDecimal amount;
    /**
     * ⼊库状态
     */
    @TableField(value = "entryStatus")
    private Integer entryStatus;

    /**
     * 创建者 id
     */
    @TableField(value = "creator", fill = FieldFill.INSERT)
    protected String creator;

    /**
     * 创建时间
     */
    @TableField(value = "createDate", fill = FieldFill.INSERT)
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd' 'HH:mm:ss")
    protected LocalDateTime createDate;

    /**
     * 最后更新人 id
     */
    @TableField(value = "updater", fill = FieldFill.INSERT_UPDATE)
    private String updater;

    /**
     * 最后更新时间
     */
    @TableField(value = "updateDate", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd' 'HH:mm:ss")
    private LocalDateTime updateDate;
}
